public class Test1 {

    public static void main(String[] args) {
       MyArray<Integer> myArray = new MyArray<>() ;
       myArray.setArray(0 , 10);
       myArray.setArray(1,20);
       Integer i = myArray.getArray(0) ;

    }
}
class MyArray<T>{
    public Object[] array = new Object[10] ;
    public void setArray(int pos , T t) {
        this.array[pos] = t ;
    }
    public T getArray(int pos){
        return (T)this.array[pos] ;
    }


}
